<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
	</head>
	<body ng-app="myapp" ng-controller="myctrl">
		<table width="100%" border="1">
			<tr>
				<td>序号</td>
				<td>商品编号</td>
				<td>商品名称</td>
				<td>商品价格</td>
			</tr>
			<tr ng-repeat="product in products">
				<td>{{$index+1}}</td>
				<td>{{product.id}}</td>
				<td>{{product.name}}</td>
				<td>{{product.price}}</td>
			</tr>
		</table>
	</body>
	
	<script type="text/javascript">
		var myapp = angular.module("myapp",[]);
		myapp.controller("myctrl",["$scope",function($scope){
			$scope.products = [
			{
				id: 1,
				name: '大彩电',
				price: 2999
			},
			{
				id: 2,
				name: '笔记本电脑',
				price: 5999
			}];
		}]);
	</script>
</html>
